package com.ly.mp.cmc.common.mapper;

import java.util.List;

/**
 * @Author: ly-songpengfei
 * @Date: 2025/8/7 10:39
 * @Description: 通用持久层接口
 * @Version:1.0
 */
public interface IbaseDal<T> {

    List<T> queryAll();

    T queryById(String id);

    int save(T entity) throws IllegalAccessException, IllegalArgumentException;

    int update(T entity) throws IllegalArgumentException, IllegalAccessException;

    int update(T entity, String prop) throws IllegalArgumentException, IllegalAccessException;

    int update(T entity, String[] props) throws IllegalArgumentException, IllegalAccessException;

    int deleteById(String id);

    int deleteBatch(String[] ids);

    int enable(String[] ids);

    int disable(String[] ids);

    int SaveBatch(List<T> entities) throws IllegalArgumentException, IllegalAccessException;

}
